<template>
  <div>
    <div style="border: 1px solid #ccc; margin: 10px; padding: 10px">
      <h4>商品 - 大衣 - 99 元</h4>
      <!-- 需求：将下面的数字加减框，封装成一个通用的组件 -->
      <!-- <SonComponents v-model="count"></SonComponents> -->
      <SonComponents :value="count" @input="input"></SonComponents>
    </div>
  </div>
</template>

<script>
import SonComponents from './components/sonComponent.vue'
export default {
  components: {
    SonComponents,
  },
  data() {
    return {
      count: 10,
    }
  },
  methods: {
    // add(a) {
    //   this.count = a
    // },
    // del(a) {
    //   this.count = a
    // },
    value(num) {
      this.count = num
    },
  },
}
</script>

<style></style>
